package com.znufe.exam.viewmodel.h5.question;

import com.znufe.exam.viewmodel.admin.question.QuestionEditItemVM;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

@Data
public class H5QuestionEditRequestVM implements Serializable {

    @ApiModelProperty(name = "id" , value = "题目")
    private Integer id;
    @NotNull
    @ApiModelProperty(name = "questionType" , value = "问题类型（1.单选题  2.多选题  3.判断题 4.填空题 5.简答题） ")
    private Integer questionType;
    // 前端页面目前无法直接传入参数subjectId, 暂将@NotNull 注解注释掉
    //@NotNull
    @ApiModelProperty(name = "subjectId" , value = "答题器基站ID")
    private Integer subjectId;
    @NotBlank
    @ApiModelProperty(name = "title" , value = "题目信息")
    private String title;

    @ApiModelProperty(name = "gradeLevel" , value = "级别")
    private Integer gradeLevel;

    @Valid
    @ApiModelProperty(name = "items" , value = "****")
    private List<QuestionEditItemVM> items;
    //@NotBlank
    @ApiModelProperty(name = "analyze" , value = "****")
    private String analyze;
    @ApiModelProperty(name = "correctArray" , value = "****")
    private List<String> correctArray;
    @ApiModelProperty(name = "correct" , value = "****")
    private String correct;
    @NotBlank
    @ApiModelProperty(name = "score" , value = "得分")
    private String score;
    @ApiModelProperty(name = "difficult" , value = "题目难度")
    @Range(min = 1, max = 5, message = "请选择题目难度")
    private Integer difficult;
    @ApiModelProperty(name = "itemOrder" , value = "题目顺序")
    private Integer itemOrder;

}
